home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE05 / SERVER / LISTING3.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1995-12-07  |  363 b   |  19 lines

  1. Query1.SQL.Clear
  2. Query1.SQL.Add(æSelect * from ATable where cust_no = :customer_noÆ);
  3. Query1.Prepare;
  4. try
  5.   for I := 1 to 1000 do
  6.   begin
  7.     Query1.ParamByName(æcustomer_noÆ).AsInteger := I;
  8.     Query1.Open;
  9.     try
  10.       { do stuff with the returned record }
  11.     finally
  12.       Query1.Close;
  13.     end; 
  14.   end;
  15. finally 
  16.   Query1.Unprepare;
  17. end;
  18.  
  19.